This invention relates to compositing pages from page components.
To print an image, a page of text and graphics, for example, the image typically is sent to a print engine from a frame buffer as a rasterized set of pixel values. The original image data from which the rasterized pixel values are generated are often in a compressed format, which must be decompressed for use by the print engine.
The original compressed image data may be stored in a file that describes elements of the image and their interrelationships. For example, the image elements may include a background layer and foreground text and graphic elements that appear overlaid on the background. Converting such a page description to a final rasterized data set is called compositing.
Sometimes it is useful to print personalized pages, for example, pages that have image elements in the foreground that differ from page to page, and other image elements in the background that are shared in common from page to page. If such pages are to be printed one after another, the computer typically repeats the entire compositing process or else changes groups of pixels in the frame buffer from page to page.
The process of generating personalized pages can be made faster using two frame buffers, one for a background layer of common elements, the other for the foreground layer of personalization elements. The pages are composited from the two frame buffers. By personalization, we mean, e.g., printing a large number of pages, which are alike in many respects and individually customized in others. For example, each page could have the same advertisement but a different mailing address and perhaps coupons targeted to the demographics of the intended recipient. To minimize storage requirements it is useful to store the elements of the page once and to composite the different pages in real time, as the pages are printed.
Page compositing can be accelerated by using a dedicated processor to decompress the elements of the page (contexts) and composite them in real time into a series of scan line data sets.
In general, in one aspect of the invention, sets of pixel data defining parts of rasterized portions of an image are received. At least one of the parts of one of the rasterized portions of the image overlaps another part of that portion of the image, and the pixel data that defines the overlapping part includes mask data that identifies pixels of the overlapping part that are to be included in the image. The sets of pixel data are decompressed. The decompressed data are used to generate a series of the rasterized portions of the image including the pixels identified in the mask data. While each of the rasterized portions of the image is being used by a print engine, another of the rasterized portions of the series is being generated.
Implementations of the invention may include one or more of the following features. Compressed sets of pixel data defining parts of rasterized portions of a series of images are received, at least some but not all parts of the rasterized portions of the respective images in the series being different. The decompression, use, and generation is performed with respect to each of the images in the series.
Different parts may be received in different compressed forms. Each of the portions of the image is associated with a swath of scan lines of the print engine and each of the parts fits within (and in some cases spans) the swath. A page description in the form of two levels of linked lists is used to determine which of the parts to use and in what order to generate the rasterized portions.
An upper level one of the linked lists includes a list of objects that form the image, the objects being sorted in top-to-bottom order by portion, and, within each portion, in order of overlap from back to front. Each object entry in the upper level list points to entries in the lower level list. Each entry in the lower level of the two lists includes a pointer to a compressed mask that identifies pixels that are to be included in a specified compositing operation. Each entry in the lower level of the two lists also includes a pointer to a compressed array of values describing pixels.
Among the advantages of the invention are one or more of the following. Because objects may overlap arbitrarily to any depth, a wide variety of pages can be printed. Compression algorithms can be custom tailored for different contexts and for the masks and pixel values associated with a given context. The storage medium that stores the objects can be smaller and slower than if the objects were not compressed. Personalization of printed pages is easier and the resulting compositing is faster because personalization objects can be substituted easily in different pages.